const routers = [
  {
    path: '/login',
    component: '@/Layout/UserLoginLayout',
    exact: true,
    layout: false,
  },
  {
    path: '/register',
    component: '@/Layout/UserLoginLayout/register',
    exact: true,
    layout: false,
  },
  {
    path: '/',
    redirect: '/tools/md5',
  },
  {
    path: '/user',
    menu: {
      name: '用户模块',
      icon: 'BarChartOutlined',
    },
    routes: [
      {
        path: '/user/list',
        component: '@/pages/user',
        menu: {
          name: '用户列表',
        },
        routes: [
          {
            path: 'info',
            component: '@/pages/user/info',
            menu: {
              name: '用户信息',
            },
            hideInMenu: true,
          },
        ],
      },
      {
        path: '/user/manage',
        component: '@/pages/user/manage',
        menu: {
          name: '用户管理',
        },
      },
    ],
  },
  {
    path: '/tools',
    menu: {
      name: '工具',
      icon: 'BarChartOutlined',
    },
    routes: [
      {
        path: '/tools/uploadFile',
        component: '@/pages/tools/upload',
        menu: {
          name: '文件简单上传',
        },
      },
      {
        path: '/tools/md5O',
        component: '@/pages/tools/thunkUpload',
        menu: {
          name: 'origin-文件上传',
        },
      },
      {
        path: '/tools/test',
        component: '@/pages/test',
        menu: {
          name: '测试文件',
        },
      },
      {
        path: '/tools/useReducer',
        component: '@/pages/test/useReducer',
        menu: {
          name: 'useReducer',
        },
      },
      {
        path: '/tools/useContext',
        component: '@/pages/test/useContext',
        menu: {
          name: 'useContext',
        },
      },
      {
        path: '/tools/useMomo',
        component: '@/pages/test/useMemo',
        menu: {
          name: 'useMemo',
        },
      },
    ],
  },
  {
    path: '/system',
    menu: {
      name: '系统页面',
    },
    routes: [
      {
        path: '/system/login',
        redirect: '/login',
        menu: {
          name: '登录',
        },
      },
      {
        path: '/system/register',
        redirect: '/register',
        menu: {
          name: '注册',
        },
      },
    ],
  },
];

export default routers;
